/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Registro.java
 *
 * Created on 6/05/2009, 11:04:41 PM
 */
package gui;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPathExpressionException;
//import org.jvnet.substance.SubstanceLookAndFeel;
//import org.jvnet.substance.watermark.SubstanceImageWatermark;
import org.xml.sax.SAXException;
import persistencia.PerfilJug;
import persistencia.Perfiles;

/**
 *
 * @author arquitectura
 */
public class VerPerfilJugador extends javax.swing.JFrame {

    private PerfilJug pj = new PerfilJug();
    private Home gc;

    public VerPerfilJugador() {
        initComponents();

        xPnlFondo pnlFondo = new xPnlFondo(11);
        this.add(pnlFondo);
        this.pack();

        this.setSize(800, 625);
        this.setLocationRelativeTo(null);

    }

    /** Creates new form Registro */
    public VerPerfilJugador(String usuario, Home gc) {

        initComponents();

        xPnlFondo pnlFondo = new xPnlFondo(11);
        this.add(pnlFondo);
        this.pack();


        this.gc = gc;
        this.setSize(800, 625);
        this.setLocationRelativeTo(null);

        try {
            pj.entrar(this, usuario);
        } catch (ParserConfigurationException ex) {
            Logger.getLogger(VerPerfilJugador.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SAXException ex) {
            Logger.getLogger(VerPerfilJugador.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(VerPerfilJugador.class.getName()).log(Level.SEVERE, null, ex);
        } catch (XPathExpressionException ex) {
            Logger.getLogger(VerPerfilJugador.class.getName()).log(Level.SEVERE, null, ex);
        }

    }


    public JLabel getJL_contrasena() {
        return jL_contrasena;
    }

    public JLabel getJL_edad() {
        return jL_edad;
    }

    public JLabel getJL_nombre() {
        return jL_nombre;
    }

    public JLabel getJL_tipo() {
        return jL_tipo;
    }

    public JLabel getJL_usuario() {
        return jL_usuario;
    }

    public void setJL_contrasena(JLabel jL_contrasena) {
        this.jL_contrasena = jL_contrasena;
    }

    public void setJL_edad(JLabel jL_edad) {
        this.jL_edad = jL_edad;
    }

    public void setJL_nombre(JLabel jL_nombre) {
        this.jL_nombre = jL_nombre;
    }

    public void setJL_tipo(JLabel jL_tipo) {
        this.jL_tipo = jL_tipo;
    }

    public void setJL_usuario(JLabel jL_usuario) {
        this.jL_usuario = jL_usuario;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jbMenuPrincipal = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jL_usuario = new javax.swing.JLabel();
        jL_nombre = new javax.swing.JLabel();
        jL_contrasena = new javax.swing.JLabel();
        jL_edad = new javax.swing.JLabel();
        jL_tipo = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Perfil Jugador");
        setBounds(new java.awt.Rectangle(0, 0, 0, 0));
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setForeground(java.awt.Color.white);
        setMinimumSize(new java.awt.Dimension(800, 625));
        setResizable(false);
        setUndecorated(true);

        jbMenuPrincipal.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/volverahome.png"))); // NOI18N
        jbMenuPrincipal.setText("Menu Principal");
        jbMenuPrincipal.setBorderPainted(false);
        jbMenuPrincipal.setContentAreaFilled(false);
        jbMenuPrincipal.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/BTN_volverahome_roll.png"))); // NOI18N
        jbMenuPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbMenuPrincipalActionPerformed(evt);
            }
        });

        jPanel1.setOpaque(false);

        jL_usuario.setForeground(new java.awt.Color(255, 255, 255));
        jL_usuario.setText("jLabel1");

        jL_nombre.setForeground(new java.awt.Color(255, 255, 255));
        jL_nombre.setText("jLabel2");

        jL_contrasena.setForeground(new java.awt.Color(255, 255, 255));
        jL_contrasena.setText("jLabel3");

        jL_edad.setForeground(new java.awt.Color(255, 255, 255));
        jL_edad.setText("jLabel4");

        jL_tipo.setForeground(new java.awt.Color(255, 255, 255));
        jL_tipo.setText("jLabel5");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(38, 38, 38)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jL_nombre)
                    .addComponent(jL_contrasena)
                    .addComponent(jL_usuario)
                    .addComponent(jL_tipo)
                    .addComponent(jL_edad))
                .addContainerGap(146, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(48, 48, 48)
                .addComponent(jL_usuario)
                .addGap(41, 41, 41)
                .addComponent(jL_nombre)
                .addGap(41, 41, 41)
                .addComponent(jL_contrasena)
                .addGap(44, 44, 44)
                .addComponent(jL_edad)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)
                .addComponent(jL_tipo)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(329, 329, 329)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(253, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(354, Short.MAX_VALUE)
                .addComponent(jbMenuPrincipal)
                .addGap(317, 317, 317))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(159, 159, 159)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jbMenuPrincipal)
                .addContainerGap(95, Short.MAX_VALUE))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-800)/2, (screenSize.height-600)/2, 800, 600);
    }// </editor-fold>//GEN-END:initComponents

    private void jbMenuPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbMenuPrincipalActionPerformed
        // TODO add your handling code here:
        this.dispose();
        JFrame.setDefaultLookAndFeelDecorated(true);

        //SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.CremeSkin");
        //SubstanceLookAndFeel.setCurrentWatermark("org.jvnet.substance.watermark.SubstanceBinaryWatermark");//Ejemplo de aplicacion de un watermark de Substance
        //SubstanceLookAndFeel.setCurrentWatermark(new SubstanceImageWatermark("http://72.29.81.246/~imindjav/images/Home.jpg"));
        //SubstanceLookAndFeel.setImageWatermarkOpacity(new Float(1));
        gc.setVisible(true);
}//GEN-LAST:event_jbMenuPrincipalActionPerformed
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
        JFrame.setDefaultLookAndFeelDecorated(true);

        SubstanceLookAndFeel.setSkin("org.jvnet.substance.skin.CremeSkin");
        //SubstanceLookAndFeel.setCurrentWatermark("org.jvnet.substance.watermark.SubstanceBinaryWatermark");//Ejemplo de aplicacion de un watermark de Substance
        SubstanceLookAndFeel.setCurrentWatermark(new SubstanceImageWatermark("http://72.29.81.246/~imindjav/images/VerPerfilAdmin.jpg"));
        SubstanceLookAndFeel.setImageWatermarkOpacity(new Float(1));
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VerPerfilJugador().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jL_contrasena;
    private javax.swing.JLabel jL_edad;
    private javax.swing.JLabel jL_nombre;
    private javax.swing.JLabel jL_tipo;
    private javax.swing.JLabel jL_usuario;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JButton jbMenuPrincipal;
    // End of variables declaration//GEN-END:variables
}
